Imports System.Data.OracleClient

Public Class clsDctnry

#Region " CLASS MEMBER VARIABLES "
  Private mCmdData As OracleCommand
  Private mDrData As OracleDataReader
#End Region

#Region " CLASS MEMBER FUNCTIONS "

  Public Function mPrPopulateGrid() As DataTable

    Dim lStrQuery As String = ""
    Dim lObjDataRow As DataRow = Nothing
    Dim lObjDataTable As New DataTable

    mPrRefreshConn()

    lStrQuery = "Select Distinct TTD_DESC, TTD_ABRVTD From TRDX_TECH_DCTNRY"

    mCmdData = New OracleCommand(lStrQuery, con)
    mDrData = mCmdData.ExecuteReader

    lObjDataTable.Columns.Add(New DataColumn("Description"))
    lObjDataTable.Columns.Add(New DataColumn("Abbreviation"))

    While mDrData.Read

      lObjDataRow = lObjDataTable.NewRow
      lObjDataRow.Item("Description") = mDrData("TTD_DESC")
      lObjDataRow.Item("Abbreviation") = mDrData("TTD_ABRVTD")

      lObjDataTable.Rows.Add(lObjDataRow)
    End While

    Return lObjDataTable

  End Function



  Public Sub mPrDelete(ByVal aStrDscrpn As String, ByVal aStrAbrvtn As String)

    Dim lStrQuery As String = ""

    lStrQuery = "DELETE FROM TRDX_TECH_DCTNRY WHERE TTD_DESC = '" & aStrDscrpn & "'"

    mCmdData = New OracleCommand(lStrQuery, con)
    mCmdData.ExecuteNonQuery()

    'lStrQuery = "DELETE FROM TRDX_TECH_DCTNRY WHERE TTD_ABRVTD = '" & aStrAbrvtn & "'"

    'mCmdData = New OracleCommand(lStrQuery, con)
    'mCmdData.ExecuteNonQuery()

  End Sub



  Public Sub mPrInsert(ByVal aStrDscrpn As String _
                     , ByVal aStrAbrvtn As String)

    Dim lStrQuery As String = ""


    lStrQuery = "Insert Into TRDX_TECH_DCTNRY (TTD_DESC, TTD_ABRVTD) VALUES "
    lStrQuery = lStrQuery & "( '" & aStrDscrpn & "'"
    lStrQuery = lStrQuery & ", '" & aStrAbrvtn & "' )"

    mCmdData = New OracleCommand(lStrQuery, con)
    mCmdData.ExecuteNonQuery()


  End Sub
#End Region



End Class
